package com.dmxtechnologies.community.war;

import javax.annotation.PostConstruct;
import javax.ejb.EJB;
import javax.enterprise.context.RequestScoped;
import javax.inject.Named;

import com.dmxtechnologies.community.ejb.interfaces.WifiRealTimeBroadcastRemote;
import com.dmxtechnologies.community.pojo.CMSDetailResponse;

@Named("cmsWifiAccessBean")
@RequestScoped
public class CMSWifiAccessBean {
	
	private CMSDetailResponse detailResponse;
	
	public CMSDetailResponse getDetailResponse() {
		return detailResponse;
	}

	public void setDetailResponse(CMSDetailResponse detailResponse) {
		this.detailResponse = detailResponse;
	}

	@EJB
	WifiRealTimeBroadcastRemote broadcastRemote; 
	
	@PostConstruct
	public void init() {
		try {
			detailResponse = broadcastRemote.getWifiList();
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
	}
	
	/* turn to 进入社区 */
	public String turnToCommunity(){
		return "index";
	}
	
}
